//
//  YanDemoViewController.swift
//  SinaWeibo
//
//  Created by mac on 2017/4/14.
//  Copyright © 2017年 mac. All rights reserved.
//

import UIKit

class YanDemoViewController: YanBaseViewController {
 
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }
    
    @objc fileprivate func showNext() {
        let vc = YanDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
    }
}

extension YanDemoViewController {
    override func setupTableView() {
        super.setupTableView()
        
        naviItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
